<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>伪类选择器</title>
    <style>
        div:first-child{
            background-color: aqua;
        }
        div:last-child{
            background-color: red;
        }
    </style>
</head>
<body>
   <div>div1</div>
   <div>div2</div>
   <div>div3</div>
   <div>div4</div>
</body>
</html>